/**
 * 
 */
package org.william.common_boot.business.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.william.common_boot.bootjpa.domain.JpaCityBean;
import org.william.common_boot.business.domain.CityBean;


/** 
 * 使用注解查询-数据
 * Description: 
 * @author xuhongwei
 * @version 1.0
 * <pre>
 * Modification History: 
 * Date         Author      Version     Description 
------------------------------------------------------------------
 * 2018年4月11日    xuhongwei     1.0        1.0 Version 
 * </pre>
 */
@Mapper
public interface CityAnnotationDao  {
	
	/**
     * 根据城市名称，查询城市信息
     *
     * @param cityName 城市名
     */
    @Select("SELECT * FROM city WHERE name = #{cityName}")
    // 返回 Map 结果集
    @Results({
            @Result(property = "id", column = "id"),
            @Result(property = "name", column = "name"),
    })
    public CityBean findByName(@Param("cityName") String cityName);

}
